// 异步POST请求
function ajaxPost(url, data, callback) {
    $.ajax({
        type: "POST",
        url: url,
        data: data,
        dataType: "json",
        success: function (result) {
            callback(result);
        }
    });
}

// 打开页面
function openPage(title, url, success, yes) {
    $.post(url, {}, function (str) {
        layer.open({
            type: 1,
            title: title,
            btn: ['保存', '关闭'],
            area: ['700px', '500px'],
            fixed: false, //不固定
            maxmin: true,
            content: str,
            success: function () {
                success();
            },
            yes: function () {
                yes();
            }
        });
    }, 'html');
}